package lovo.practice_7_14;

import com.sun.source.tree.NewArrayTree;
import lovo.Util.Util;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class FindPanel extends JPanel implements ActionListener {
    private J189_7_14 frame;

    private JLabel JLabelFind = new JLabel();
    private Icon imgback = Util.getimagesIcon("/Images/buttonOff.jpg");
    private JButton jButtonBack;

    public JLabel getJLabelFind() {
        return JLabelFind;
    }

    public void setJLabelFind(JLabel JLabelFind) {
        this.JLabelFind = JLabelFind;
    }

    public FindPanel(J189_7_14 frame) {

        this.frame = frame;
        this.setLayout(null);
        this.setOpaque(false);
        JLabelFind.setBounds(200, 200, 150, 30);
        JLabelFind.setFont(new Font("songti", Font.BOLD, 20));
        this.add(JLabelFind);


        jButtonBack = new JButton(imgback);
        jButtonBack.setBounds(500, 400, 140, 50);
        this.add(jButtonBack);
        jButtonBack.addActionListener(this);
    }


    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == jButtonBack) {
            frame.switchPanel("mune");
        }
    }
}
